{% extends 'admin/master.html' %}

{% block body %}
<h1>Admin Utilities</h1>
<h3>Upload New JSON Data File</h3>
<p>Choose 'Courses' to upload files in database/courses and choose 'Requirements' to upload files in database/requirements.
    Those files should follow the format in database/schemas.
</p>
<form method="POST" enctype="multipart/form-data">
      <div class="form-group">
    {{ file_upload_form.csrf_token }}
    {{ file_upload_form.file }}
    {{ file_upload_form.fileType }}

    </div>
    {{ file_upload_form.submit(class="btn btn-primary") }}

</form>

<h3>Update Course Information</h3>
<form method="POST" enctype="multipart/form-data">
    <div class="form-group">
        {{ update_form.dept.label }} {{ update_form.dept(placeholder='COMPSCI') }}
        {{ update_form.course_id.label }} {{ update_form.course_id(placeholder='161') }}
        {{ update_form.quarter_code.label }} {{ update_form.quarter_code }}
        {{ update_form.year_term_code.label }} {{ update_form.year_term_code(placeholder='2017-92')}}
    </div>
    <div>
        {{update_form.download(class="btn btn-primary")}}
    </div>
</form>
{% endblock %}